#include "BasicSecurity.h"
#include "BasicCrc32.h"

namespace utility
{
	BasicSecurity::BasicSecurity(void)
	{
	}

	BasicSecurity::~BasicSecurity(void)
	{
	}

	unsigned long BasicSecurity::basic_encode( char * buf, int len )
	{
		unsigned long crc = GetCrc32( buf, len );
		EncryptData( buf, len );
		return crc;
	}

	unsigned long BasicSecurity::basic_decode( char * buf, int len )
	{
		DecryptData( buf, len );
		unsigned long crc = GetCrc32( buf, len );
		return crc;
	}
}
